# this moduel is used to find the proper sinker based on the data type to execute
# data type: json -> HttpSinker
# else -> throw error
from fake_data_sinker.http_sinker import HttpSinker

class SinkerExecutor:
    def __init__(self, config, common_paths) -> None:
        self.common_paths = common_paths
        self.config = config

    def execute(self, data_type):
        if data_type == 'json':
            sinker = HttpSinker(self.config.get('http-sinker'), self.common_paths)
            sinker.send_data()
        else:
            raise ValueError("Invalid data type!")
